package com.sikaryofficial.workbench.domain.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

/**
 * 编码对象 code_t
 * 
 * @author wuweihong
 * @date 2024-10-09
 */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("business_code_t")
public class BusinessCode implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 编码ID */
    @TableId(type = IdType.ASSIGN_ID, value = "business_code_id")
    private Long businessCodeId;

    /** 前缀 */
    private String prefix;

    /** 业务类型, 1-主订单,2-子订单 */
    private Integer businessType;

    /** 当前序号 */
    private Integer currValue;

    /** 租户号 */
    private Integer tenantId;

    /** 乐观锁 */
    private Integer revision;

    /** 创建人 */
    @TableField(fill = FieldFill.INSERT)
    private Long createdBy;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    /** 更新人 */
    @TableField(fill = FieldFill.UPDATE)
    private Long updatedBy;

    /** 更新时间 */
    @TableField(fill = FieldFill.UPDATE)
    private Date updatedTime;

    /** 删除版本：默认为0；删除则赋值当前记录主键ID */
    private Long deletedVersion;

}
